#include "Grid.h"
#include"SurfaceList.h"


Grid::Grid()
{
	content = nullptr;
	count = 0;
}


Grid::~Grid()
{
	
}

void Grid::Add(Surface * obj)
{
	if (count == 0)
	{
		content = obj;
	}
	else if (count == 1)
	{
		Surface* pObj = content;
		content = new SurfaceList;
		((SurfaceList*)content)->list.push_back(pObj);
		((SurfaceList*)content)->list.push_back(obj);
	}
	else
	{
		((SurfaceList*)content)->list.push_back(obj);
	}
	count++;
}
